package com.lzs.adx.web.modules.job.task;

import com.lzs.adx.web.commmon.utils.DateUtil;
import com.lzs.adx.web.modules.adx.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class RealDataTask implements ITask{

   @Autowired
    private ReportService reportService;
    @Override
    public void run(String params) {
        log.info("开始执行实时数据统计任务");
        String date;
        if(StringUtils.isNotBlank(params)){
            date=params;
        }else{
            date= DateUtil.getCurrentTime();
        }
        reportService.realDataMind(date);
        log.info("执行统计实时数据统计任务结束了");
    }
}
